export const getFileType = (url: string) => {
  return url.substring(url.lastIndexOf('.') + 1);
};

export const isImage = (url: string) => {
  return [
    'png',
    'jpeg',
    'jpg',
    'webp',
    'gif',
    'GIF',
    'JPG',
    'JPEG',
    'bmp',
    'BMP',
  ].includes(getFileType(url));
};
